﻿#include "qwgraphicsview.h"
#include <QMouseEvent>
#include <QPoint>

void QWGraphicsView::mouseMoveEvent(QMouseEvent *event)
{
    QPoint point = event->pos();
    emit mouseMovePoint(point);
    QGraphicsView::mouseMoveEvent(event);
}

void QWGraphicsView::mousePressEvent(QMouseEvent *event)
{
    if (event->button() == Qt::LeftButton)
    {
        QPoint point = event->pos();
        emit mouseClicked(point);
    }
    QGraphicsView::mousePressEvent(event);
}

QWGraphicsView::QWGraphicsView(QWidget *parent) : QGraphicsView(parent)
{
}
